package com.example.demo.xcx

import android.app.Application
import android.os.Bundle
import android.util.Log
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import com.example.demo.R



class XiaoCXActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_xiao_c_x)
        initXiaoCx()

        var button = findViewById<Button>(R.id.button);
        button.setOnClickListener {

//            FinAppClient.appletApiManager.startApplet(this,"")
        }
    }

    private fun initXiaoCx(){
//        val config = FinAppConfig.Builder()
//                .setAppKey("SDKKEY")
//                .setAppSecret("SECRET")
//                .setApiUrl("https://api.finclip.com")
//                .setApiPrefix("/api/v1/mop/")
//                .setGlideWithJWT(false)
//                .build()
//        val callback: FinCallback<Any?> = object : FinCallback<Any?> {
//            override fun onSuccess(result: Any?) {
//                // SDK初始化成功
//                Log.i("Xiaochengxu","初始化成功")
//            }
//
//            override fun onError(code: Int, error: String) {
//                // SDK初始化失败
//                Log.i("Xiaochengxu","初始化失败")
////                Toast.makeText(this@AppletApplication, "SDK初始化失败", Toast.LENGTH_SHORT).show()
//            }
//
//            override fun onProgress(status: Int, error: String) {}
//        }
//        init(this.application, config, callback)
    }
}